home *** CD-ROM | disk | FTP | other *** search
/ Teach Your Children: Road Construction Ahead / Teach Your Children: Road Construction Ahead.iso / pc / rca / road.dxr / 00045_simFrame.ls < prev    next >
Encoding:
Text File  |  1996-07-17  |  934 b   |  33 lines

  1. global gTruckObject, gSimObject, gActorList
  2.  
  3. on exitFrame
  4.   if the status of gTruckObject = #animating then
  5.     do(the animationScript of gTruckObject)
  6.     go(the frame)
  7.   else
  8.     if the playBack of gTruckObject then
  9.       driveBack(gTruckObject)
  10.       go(the frame)
  11.     else
  12.       if the demoFlag of gSimObject <> 1 then
  13.         updateActors()
  14.         go(the frame)
  15.       else
  16.         if count(gActorList) = 0 then
  17.           createGlobalButtons(gSimObject)
  18.         end if
  19.         if the finishedFlag of gSimObject <> 1 then
  20.           set spriteCell to the cell of gTruckObject
  21.           set index to getPos(the pathList of gSimObject, spriteCell) + 1
  22.           set newMove to getPropAt(the pathList of gSimObject, index)
  23.           set the newMove of gTruckObject to newMove
  24.           moveTruck(gTruckObject, newMove)
  25.           go(the frame)
  26.         else
  27.           afterPlayback()
  28.         end if
  29.       end if
  30.     end if
  31.   end if
  32. end
  33.